home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 April / Chip CMCD0400.iso / SOFTWARE / Freeware / Programare / Bass / BASS.TXT < prev    next >
Encoding:
Text File  |  1999-07-26  |  14.5 KB  |  407 lines

  1. BASS 0.6a - Copyright (c) 1999 Ian Luck. All rights reserved.
  2. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  3.  
  4. Files that you should have found in the BASS "package"
  5. ======================================================
  6. BASS.TXT      This file
  7. BASS.DLL      The BASS module
  8. BASS.H        BASS header file
  9. BASS.LIB      BASS import library (Visual C++, Watcom C++, etc...)
  10. BASSBCB.LIB   BASS import library (Borland C++ Builder, maybe others?)
  11. BASS.CHM      BASS documentation
  12. BASSTEST.EXE  BASS example program
  13. BASSTEST.C    Example program source-code
  14. BASSTEST.RC   Example program resource file
  15. BASSTEST.H    Example program resource header file
  16. CONTEST.EXE   BASS console example program
  17. CONTEST.C     Console example program source-code
  18. 3DTEST.EXE    BASS 3D and EAX example program
  19. 3DTEST.C      3D example program source-code
  20. 3DTEST.RC     3D example program resource file
  21. 3DTEST.H      3D example program resource header file
  22. ENGINE.WAV    3D example program test WAVE sample
  23. LOADNGET.C    LoadLibrary/GetProcAddress example source-code
  24. LOADNGET.RC   LoadLibrary/GetProcAddress example resource file
  25. FILE_ID.DIZ   BBS description file
  26.  
  27.  
  28. What's the point?
  29. =================
  30. BASS is a sound system for use in Windows 95/98/2000/NT software. It's
  31. purpose is to provide powerful (yet easy to use) sample, stream, MOD
  32. music, and audio CD playback functions.
  33.  
  34. See the documentation for descriptions of all the BASS functions. You
  35. will need to have Internet Explorer installed to view the documentation.
  36. The BASS.H file also contains brief descriptions of the BASS functions.
  37. You should also see the included example program source-codes for some
  38. examples of how to use BASS in your own programs.
  39.  
  40.  
  41. Requirements
  42. ============
  43. BASS requires DirectX 3 or above, so it not only works with Windows
  44. 95/98/2000, but also Windows NT 4.0 (with service pack 4). BASS does
  45. not require that a soundcard with DirectSound/DirectSound3D hardware
  46. accelerated drivers is installed, but it does improve performance if
  47. there is one. BASS also takes advantage of MMX acceleration, which
  48. improves the performance of the MOD music functions.
  49.  
  50. BASS has so far been tested, and found to work fine, with Watcom C/C++,
  51. Visual C++ and CodeWarrior. It should be possible to use BASS with non
  52. C/C++ compilers too, but you'll have to convert the BASS.H file first.
  53. Please report any other compilers that BASS does or doesn't work with.
  54.  
  55.  
  56. Main Features
  57. =============
  58. * WAV samples
  59. - supports mono/stereo 8/16 bit samples (including compressed)
  60.  
  61. * Custom samples
  62. - generate or load custom samples
  63.  
  64. * Sample streams
  65. - stream any sample data in mono/stereo 8/16 bit
  66.  
  67. * File streams
  68. - MP3 and WAV (including compressed) file streaming
  69.  
  70. * MOD music
  71. - uses the XMPlay engine = balls-on accurate reproduction
  72.  
  73. * CD audio
  74. - play any track with a single function call
  75.  
  76. * Synchronization
  77. - synchronize events in your program to the music
  78.  
  79. * 3D sound
  80. - play samples/streams/musics in any 3D position
  81.  
  82. * Environmental Audio eXtensions (EAX)
  83. - enhanced 3D sound with 3D reverberations
  84.  
  85. * Free!
  86. - you may freely use BASS in your freeware games/demos/etc...
  87.  
  88.  
  89. Samples
  90. =======
  91. BASS supports compressed and non-compressed mono/stereo 8/16 bit WAV
  92. samples. Samples may be loaded from a file or a memory location. When
  93. possible, samples are loaded into the hardware, so that they benefit
  94. from "hardware acceleration". Use BASS_GetInfo to see which (if any)
  95. sample formats are supported by the hardware.
  96.  
  97. You can set the max number of simultaneous playbacks for each sample,
  98. and the override method to use when the max number has been reached.
  99. The sample rate, volume, panning and looping are adjustable for each
  100. playing sample.
  101.  
  102. BASS also allows you to use other sample formats (ie. not only WAVs),
  103. by letting you generate the sample data.
  104.  
  105. NOTE: DirectSound only allows complete sample looping, you can't loop
  106.       just a part of the sample.
  107.  
  108.  
  109. Streams
  110. =======
  111. You can play a large amount of sample data without requiring a large
  112. amount of memory, by using a sample stream. BASS allows streaming in
  113. mono/stereo and 8/16 bit. The sample rate, volume and panning are
  114. adjustable for each stream. Multiple sample streams can be played
  115. simultaneously.
  116.  
  117. There are two options for streaming, either BASS streams it for you
  118. (MP3 and WAV formats), or you create a function to write the stream
  119. data. By creating your own stream writer functions, you can play any
  120. sample format that is not supported by BASS, by decoding the data
  121. into a stream.
  122.  
  123. BASS can automatically stream MP3 and WAV files, from either file or
  124. memory. Only MPEG 1.0/2.0 layer 3 files are supported. Layers 1 and 2
  125. are not supported, but they have lower quality and compression ratios,
  126. so it's no big loss! WAV files can be compressed with any CODEC, but
  127. the CODEC is required to be installed on the user's computer for the
  128. WAV to be decoded.
  129.  
  130.  
  131. MOD Music
  132. =========
  133. BASS's MOD playback is based on the XMPlay engine. The XM/IT/MOD/S3M/MTM
  134. formats are supported, with FastTracker2 and ProTracker1 options also
  135. available for the MOD files. MODs can be loaded from a file or a memory
  136. location. The MOD's samples are interpolated during mixing for superior
  137. sound quality.
  138.  
  139. The looping, ramping (click removal), volume, amplification, and panning
  140. seperation settings are all configurable, as is the balance and playback
  141. rate. Multiple MOD musics can be played simultaneously.
  142.  
  143. You can synchronize events in your program to when a MOD reaches chosen
  144. positions, and/or to when chosen instruments are played. The number of
  145. synchronizers used is unlimited.
  146.  
  147.  
  148. CD Audio
  149. ========
  150. The CD system is seperate from the other functions in BASS, it doesn't
  151. require DirectSound or any other special libraries to be installed.
  152. BASS makes playing CD audio very simple... there's nothing more to say!
  153.  
  154.  
  155. 3D Sound (and EAX)
  156. ==================
  157. If you are at all familiar with DirectSound3D, then you should have no
  158. problem using the 3D functions of BASS. But, even if you have not used
  159. DS3D it shouldn't be too hard to do 3D sound, see the example source
  160. file 3DTEST.C for a simple example of using 3D sound in BASS.
  161.  
  162. To enable 3D sound, simply use the BASS_DEVICE_3D flag with BASS_Init.
  163. Then use the BASS_SAMPLE_3D/BASS_MUSIC_3D flag when loading/creating a
  164. sample/stream/MOD music to enable 3D functionality on it.
  165.  
  166. 3D sound sources are mono, the left/right components are calculated by
  167. the 3D engine. When using a stereo sound in 3D, it is converted to mono
  168. during playback, which is a bit of needless processing (as well as a
  169. waste of memory). So your 3D sounds should be mono in the first place.
  170. MOD musics are automatically mixed in mono when used in 3D, but it is up
  171. to you to use mono samples and streams in 3D. Because 3D channels are
  172. mono, playing MOD musics and streams in 3D can actually require less CPU
  173. than in plain stereo, because less software mixing is required, assuming
  174. the 3D mixing is being done by the hardware.
  175.  
  176. 3D sounds and non-3D sounds can be played together, it's not a matter of
  177. all 3D or else none 3D.
  178.  
  179. EAX greatly enhances the 3D sound by reverberating the sounds to mimic
  180. the behaviour of a real environment. There are plenty of different types
  181. of environment to choose from, see the EAX_ENVIRONMENT_xxx flags for a
  182. complete list. Presets (EAX_PRESET_xxx) are provided, but the EAX reverb
  183. parameters can also be fine tuned to taste. The amount of reverb applied
  184. to each channel can be adjusted, or as is the default, EAX can calculate
  185. the reverb automatically, based on the distance of the sound from the
  186. listener.
  187.  
  188. EAX affects 3D channels only, "normal" channels are unaffected by it.
  189. For the EAX effects to be heard, it requires that the user's soundcard
  190. supports EAX, and that DirectX 5 or above is installed.
  191.  
  192.  
  193. Using BASS
  194. ==========
  195. To use BASS in your C/C++ programs all you should need to do is include
  196. BASS.H and link with BASS.LIB. To use BASS with another language you'll
  197. first have to convert the header file. Or, as a last resort, you could
  198. use LoadLibrary and GetProcAddress.
  199.  
  200. One benefit of the LoadLibrary method is that it allows you to "look"
  201. for the correct BASS version, because you can load and unload BASS.DLL
  202. at any time. This also allows those who'ld prefer not to have a seperate
  203. DLL to store it with the program (eg. in a resource), write it to disk,
  204. load it, use it, free it and delete it.
  205.  
  206. The major downside, is that you have to manually import each function
  207. that you use, using the GetProcAddress function. But it has been made
  208. a lot simpler to import BASS this way by the use of the BASSDEF #define.
  209. Here's a small example:
  210.  
  211. #define BASSDEF(f) (WINAPI *f) // define the functions as pointers
  212. #include "bass.h"
  213. ...
  214. HINSTANCE bass=LoadLibrary("BASS.DLL"); // load BASS
  215. BASS_Init=GetProcAddress(bass,"BASS_Init"); // get BASS_Init
  216. BASS_Init(-1,44100,0,hWnd); // call BASS_Init
  217.  
  218. See the LOADNGET.C file for a more complete example.
  219.  
  220. There is no guarantee that all future BASS versions will be compatible
  221. with all previous versions, so your program should use BASS_GetVersion
  222. to check the version that is loaded. This also means that you should
  223. put BASS.DLL in the same directory as your program (not just somewhere
  224. in the path), to avoid the possibility of a wrong version being loaded.
  225.  
  226. If you are updating your software from a previous BASS version, then
  227. you should check the "History" section (below), to see which (if any)
  228. of the functions that you are using have been affected by a change.
  229.  
  230.  
  231. Latest Version
  232. ==============
  233. The latest version of BASS can always be found at the BASS homepage:
  234.  
  235.         http://www.icl.ndirect.co.uk/music/
  236.  
  237.  
  238. Copyright, Disclaimer, and all that other jazz
  239. ==============================================
  240. The BASS library is free for non-money making use... if you are
  241. not charging for the software, then you can use BASS in it for
  242. free (a mention in the credits would be nice though!). If you
  243. wish to use BASS in shareware or commercial products, then see
  244. the next section.
  245.  
  246. This software is provided as-is, without warranty of ANY KIND,
  247. either expressed or implied, including but not limited to the
  248. implied warranties of merchantability and/or fitness for a
  249. particular purpose. The author shall NOT be held liable for
  250. ANY damage to you, your computer, or to anyone or anything else,
  251. that may result from its use, or misuse. Basically, you use it
  252. at YOUR OWN RISK.
  253.  
  254. Usage of BASS indicates that you agree to the above conditions.
  255.  
  256. You may freely distribute the BASS package as long as NO FEE is
  257. charged and all the files remain INTACT AND UNMODIFIED.
  258.  
  259. All trademarks and other registered names contained in the BASS
  260. package are the property of their respective owners.
  261.  
  262.  
  263. BASS in shareware and commercial software?
  264. ==========================================
  265. BASS is available for use in your shareware and commercial software.
  266. The license types available are as follows:
  267.  
  268. SHAREWARE: Allows the usage of BASS in an unlimited number of your
  269. shareware products.
  270.  
  271. SINGLE COMMERCIAL: Allows the usage of BASS in a single commercial
  272. product.
  273.  
  274. UNLIMITED COMMERCIAL: Allows the usage of BASS in an unlimited number
  275. of your commercial products. This license is on a per site basis. So
  276. if your company has two sites and both use BASS, then two licenses are
  277. required.
  278.  
  279. In all cases there are no royalties to pay, and you can use all future
  280. BASS updates without further cost. One license covers one person or
  281. entity and is not transferable.
  282.  
  283. Visit the BASS website for the latest pricing, and on-line payment:
  284.  
  285.         http://www.icl.ndirect.co.uk/music/
  286.  
  287.  
  288. History
  289. =======
  290. These are the major (and not so major) changes at each version
  291. stage. There are ofcourse bug fixes and other little improvements
  292. made along the way too! To make upgrading simpler, all functions
  293. affected by a change to the BASS interface are listed.
  294.  
  295. 0.6a - 26/7/99
  296. --------------
  297. * Half rate MP3 option (lower CPU usage)
  298.     BASS_MP3_HALFRATE
  299. * Loading/streaming from file offsets
  300.     BASS_MusicLoad
  301.     BASS_SampleLoad
  302.     BASS_StreamCreateFile
  303. * Global music/sample/stream volume levels
  304.     BASS_SetGlobalVolumes
  305.     BASS_GetGlobalVolumes
  306. * Other new function
  307.     BASS_SampleStop
  308. * New synchronizer
  309.     BASS_SYNC_END
  310. * New sample overrider
  311.     BASS_SAMPLE_OVER_DIST
  312. * LoadLibrary/GetProcAddress instructions and example
  313.  
  314. 0.5 - 4/7/99
  315. ------------
  316. * Documentation!
  317. * File streaming (MP3 and WAV)
  318.     BASS_StreamCreateFile
  319. * Custom generated samples
  320.     BASS_SampleCreate
  321.     BASS_SampleCreateDone
  322. * Other new function
  323.     BASS_MusicSetPositionScaler
  324. * Renamed function
  325.     BASS_ChannelClearSync -> BASS_ChannelRemoveSync
  326. * Alterations made to
  327.     BASS_ChannelGetPosition
  328.     BASS_SampleLoad
  329.     BASS_StreamPlay
  330.  
  331. 0.4 - 30/3/99
  332. -------------
  333. * Compressed WAV samples support (using audio CODECs)
  334. * Updated CD volume handling - now works with SB Live
  335. * More linear channel volume/pan scales (were slightly off before)
  336. * "no sound" device option
  337. * 3D sound functions
  338.     BASS_Set3DFactors
  339.     BASS_Get3DFactors
  340.     BASS_Set3DPosition
  341.     BASS_Get3DPosition
  342.     BASS_Apply3D
  343.     BASS_SamplePlay3D
  344.     BASS_SamplePlay3DEx
  345.     BASS_ChannelSet3DAttributes
  346.     BASS_ChannelGet3DAttributes
  347.     BASS_ChannelSet3DPosition
  348.     BASS_ChannelGet3DPosition
  349. * EAX functions
  350.     BASS_SetEAXParameters
  351.     BASS_GetEAXParameters
  352.     BASS_ChannelSetEAXMix
  353.     BASS_ChannelGetEAXMix
  354. * Other new functions
  355.     BASS_GetDeviceDescription
  356.     BASS_SetBufferLen
  357.     BASS_ChannelGetFlags
  358.     BASS_ChannelPause
  359.     BASS_ChannelResume
  360.     BASS_ChannelSetPosition
  361. * Replaced function
  362.     BASS_CDResume -> BASS_ChannelResume
  363. * Alterations made to
  364.     BASS_Init
  365.     BASS_CDInit
  366.     BASS_SampleLoad
  367.     BASS_StreamPlay
  368.     BASS_INFO structure
  369.     BASS_SAMPLE structure
  370.     BASS_DEVICE_xxx flags
  371.     BASS_SAMPLE_xxx flags
  372.  
  373. 0.3 - 8/3/99
  374. ------------
  375. * Synchronization functions
  376.     BASS_ChannelSetSync
  377.     BASS_ChannelClearSync
  378. * Other new functions
  379.     BASS_GetVersion
  380.     BASS_ChannelGetPosition
  381.     BASS_ChannelGetLevel
  382.     BASS_ChannelGetAttributes
  383.     BASS_ChannelSetAttributes
  384. * Replaced functions
  385.     BASS_MusicStop -> BASS_ChannelStop
  386.     BASS_MusicSetVolume -> BASS_ChannelSetAttributes
  387.     BASS_CDStop -> BASS_ChannelStop
  388.     BASS_CDSetVolume -> BASS_ChannelSetAttributes
  389.     BASS_CDGetVolume -> BASS_ChannelGetAttributes
  390.     BASS_ChannelUpdate -> BASS_ChannelSetAttributes
  391. * Alterations made to
  392.     BASS_MusicPlayEx
  393.     BASS_StreamPlay
  394.     BASS_INFO structure
  395.  
  396. 0.2 - 28/2/99
  397. -------------
  398. * First public release
  399.  
  400.  
  401. Bug reports, Suggestions, Comments, Enquiries, etc...
  402. =====================================================
  403. If you have any of the aforementioned you can email:
  404.  
  405.         bass@icl.ndirect.co.uk
  406.  
  407.